// pages/index/decorcompany/maps.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    latitude: 24.08,
    longitude: 118.08,
   },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this
    let dataArr = options.local.split(',');
    var latitudes = dataArr[0];
    var longitudes = dataArr[1];
    var company = dataArr[2];
    console.log(latitudes)
    wx.setNavigationBarTitle({
      title: company //页面标题为路由参数
    })
    that.setData({
      latitude: latitudes,
      longitude: longitudes,
      markers: [{
        id: 1,
        latitude: latitudes,
        longitude: longitudes,
        iconPath: "../../../images/decormpany/mapker-icon.png",
        width: 18,
        height: 25,
         callout: {
              content: company,
              color: "black",
              fontSize: "16",
              borderRadius: "10",
              bgColor: "#ffffff",
              padding: "10",
              display: "ALWAYS"
            },
      }],
    })
  },
  regionchange(e) {
    console.log(e.type)
  },
  markertap(e) {
    console.log(e.markerId)
  },
  controltap(e) {
    console.log(e.controlId)
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})